#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include "BaseSort.h"
#include "HeapSort.h"
#include "BubbleSort.h"
#include "QuickSort.h"
#include "Sort.h"
using namespace std;

vector<int> getRandData(const size_t size) {
    vector<int> data;
    for(int i=size; i>0; i--)
        data.push_back(rand()/1111);
    return data;
}

int sort_main() {

    cout << "this is unsorted:" << endl;
    vector<int> data = getRandData(20);
    BaseSort::printData(data);
    cout<<endl;

//    BubbleSort *bubbleSort = new BubbleSort(data);
    HeapSort *heapSort = new HeapSort(data);
    heapSort->sort();
    QuickSort *quickSort = new QuickSort(data);
    quickSort->sort();


//    cout << "--------------------------" << endl;
//    bubbleSort->printRawData();
//    heapSort->printRawData();
//    quickSort->printRawData();

    cout << "--------------------------" << endl;
//    bubbleSort->printSortedData();
    heapSort->printSortedData();
    quickSort->printSortedData();

    return 0;
}
